<template>
  <div class="match" v-loading="loading">
    <el-empty description="暂无数据" v-if="matchs.length == 0" />
    <el-scrollbar height="100%" :always="matchs.length > 0" ref="matchsref" :class="matchs.length > 0 ? 'scrollbarsell' : ''">
      <MatchItem v-for="item in matchs" :key="item.id" :match="item" />
    </el-scrollbar>
  </div>
</template>
<script setup>
import MatchItem from './match-item/MatchItem.vue'

const props = defineProps({
  matchs: Array,
  loading: Boolean,
}) 

const matchsref = ref(null)

</script>
<style lang="scss" scoped>
.match {
  flex: 1;
  height: 100%;
  overflow: hidden;
  
}

::v-deep .scrollbarsell .is-vertical {
  border-radius: 4px;
  background-color: #f5f5f5;
}
</style>
